<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8" import="java.sql.*"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>个人信息的处理页面</title>
</head>
<body>

	<jsp:useBean id="db" class="com.DBManager" scope="page"></jsp:useBean>
	<%	
		request.setCharacterEncoding("utf-8");
		String uid=request.getParameter("uid");
		String email=request.getParameter("email");
		String tel=request.getParameter("tel");
	 	String qq=request.getParameter("qq");
		String WeChat=request.getParameter("WeChat");
		String departments=request.getParameter("departments");
		String profession=request.getParameter("profession");
		String company=request.getParameter("company");
		String classNum=request.getParameter("classNum"); 
		String username=request.getParameter("username"); 
		String school=request.getParameter("school");  
		String [] lan=request.getParameterValues("lan");  
		String lans ="";
		if(lan!=null){
			for(int i = 0; i < lan.length;i++){
				lans=lans+lan[i]+",";
			}
		}
		
		tel=tel.trim();/*左右空格不为空  */
		email=email.trim();
		String sql="insert into userinfo(uid,email,tel,qq,WeChat,departments,profession,company,classNum,username,school,lans) values('"+uid+"','"+email+"','"+email+"','"+qq+"','"+WeChat+"','"+departments+"','"+profession+"','"+company+"','"+classNum+"','"+username+"','"+school+"','"+lans+"')";
		db.executeSql(sql);
		db.Release();
		out.println("修改成功!");
	
		
	%>
	
</body>
</html>